<?php
if(isset($_GET['id'])){
    $category = $Bus->Category->getItemById($_GET['id']);
}else{
    $url = url('errors','404');
    redirect($url);
}
include 'component/header.php';
include 'component/slidebar.php';
?>

<!-- BEGIN CONTENT -->
<div id="content">
    <div class="box-out">
    	<div class="box-in">
    		<div class="box-head"><h1>Chi tiết thể loại sản phẩm...</h1></div>
    		<div class="box-content">
    			<div class="form">
    				<form>
    					<fieldset>
    						<label for="small_field">Tên loại sản phẩm</label>
    						<input type="text" class="text small" value="<?php echo $category->categorys_name;?>" disabled="true"/>
                            
                            <label for="textarea_field">Mô tả loại sản phẩm này</label>
    						<textarea class="text textarea" cols="80" rows="10" disabled="true"><?php echo $category->categorys_description; ?></textarea>
                            
                            <label for="select_field">Trạng thái</label>
    						<select class="text" disabled="true">
                                <option value="1" <?php echo ($category->categorys_status)?"selected='selected'":"";?>>Enable</option>
				                <option value="0" <?php echo ($category->categorys_status)?"":"selected='selected'";?>>Disable</option>
    						</select>

                            <label for="select_field">Category parent </label>
    						<select class="text" disabled="true">
                                <?php $catparent = $Bus->Category->getItemById($category->categorys_parentid);?>
                                <?php if($category->categorys_parentid != NULL){?>
                                <option value="<?php echo $catparent->idcategorys;?>"><?php echo $catparent->categorys_name;?></option>
                                <?php }else{?>
                                <option value="0">None</option>
                                <?php }?>
    						</select>
    						<hr />
                            <a class="submit" href="/?mod=admin&act=cats-edit&id=<?php echo $category->idcategorys;?>">Thay đổi</a>
                            <a class="submit" href="<?php echo url('admin','cats-manager');?>">Trang quản lý loại sản phẩm</a>
    					</fieldset>
    				</form>
    			</div><!-- end div .form -->
    		</div><!-- end div .box-content -->
    	</div><!-- end div .box-in -->
</div><!-- end div #content -->
<!-- END CONTENT -->

<?php
include 'component/footer.php'; 
?>
